#{extends 'frame.html' /} #{set title:'商家对账' /} #{set 'moreStyles'}
<link rel="stylesheet" media="screen"
	href="@{'/public/stylesheets/admin/user-manage.css'}" />
<link rel="stylesheet" media="screen"
	href="@{'/public/stylesheets/jquery.pagination.css'}" />
<link rel="stylesheet" media="screen"
	href="@{'/public/stylesheets/datePicker.css'}" />

#{/set}
<div class="tabbedCard" id="waitingTaskPanel">
	<div class="contentTitle">账单明细</div>
	<div class="tabSwitchWrapper">
		<a class="tab-cell taskTypeTab focus" href="javascript:;" for="buyerTask" status="BUYERTASK">子任务明细</a>
		<a class="tab-cell taskTypeTab" href="javascript:;" for="taskTable" status="TASK">父任务明细</a>
	</div>
	<div id="taskFilterPanel">
		<div class="clearfix mb10">
		#{if role=='admin'}
			<span class="floatLeft mr10">商家昵称</span> 
			<input type="text" class="floatLeft mr10 inputText" id="sellerNick" value=""/>
		#{/if}
			<span class="floatLeft mr10">平台</span> <select
				class="floatLeft mr10 mt4" id="taskPlatform">
				<option value="">全部</option> #{list items:platforms, as:'p'}
				<option value="${p}">${p.title}</option> #{/list}
			</select> <span class="floatLeft mr10">店铺</span> <select
				class="floatLeft mr10 mt4" id="shop">
				<option value="">全部</option> #{list items:adminStatusList, as:'s'}
				<option value="${s}">${s.title}</option> #{/list}
			</select> <span class="floatLeft mr10">接手时间</span> <span
				class="floatLeft mr10 cal-date-input"> <input
				class="inputDate start-date" id="beginTakeTime" readonly="readonly"
				value="" />
			</span> <span class="floatLeft mr10 med-cal-split">-</span> <span
				class="floatLeft mr10 cal-date-input"> <input
				class="inputDate end-date" id="endTakeTime" readonly="readonly"
				value="" />
			</span> <a class="stdColorButton floatLeft queryBtn" href="javascript:;"
				id="queryBtn">查询</a>
			<a class="stdColorButton floatLeft queryBtn ml20" href="javascript:;"
				id="expoptBtn" target="id_iframe">导出excel</a>
			<span class="floatLeft">
			<iframe id="iframe" name="id_iframe" style="display:none;height: 30px;" scrolling="no"></iframe>
		</span>
		</div>
	</div>
		
	<div class="mt20 buyerTask-panel" id="buyerTask">
		<table class="normTable buyerTaskTable">
			<thead>
				<tr>
					<td>任务编号</td>
					#{if role=='admin'}
					<td>商家昵称</td>
					#{/if}
					<td>终端</td>
					<td>接单时间</td>
					<td>买号</td>
					<td>订单号</td>
					<td>任务状态</td>
					<td>商品价格(元)</td>
					<td>邮费(元)</td>
					<td>退款保证金(元)</td>
					<td>买手付款(元)</td>
					<td>平台快递费(元)</td>
					<td>增值服务支出</td>
					<td>买手佣金(元)</td>
					<td>子任务花费汇总(元)</td>
				</tr>
			</thead>
			<tbody id="blanceContainer"></tbody>
		</table>
		<div id="noMsg">
			<div class="warnBox">
				<span class="iconfont">&#xf00b6;</span> 没有任务!
			</div>
		</div>
		<div class="pagin-btm clearFix" style="display: none;">
			<div class="pagination"></div>
		</div>
		<div class="popWrapper" style="display: none;" id="tr_loading_mask">
			<div class="maskLayer"></div>
			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />
		</div>
	</div>
	<!-- 父任务 -->
	<div class="mt20" id="taskTable" style="display: none;">
		<table class="normTable TaskTable">
			<thead>
				<tr>
					<td>任务编号</td>
					#{if role=='admin'}
					<td>商家昵称</td>
					#{/if}
					<td>发布时间</td>
					<td>平台</td>
					<td>店铺名称</td>
					<td>商品ID</td>
					<td>商品价格(元)</td>
					<td>任务总数(单)</td>
					<td>接手数量(单)</td>
					<td>pc端未接手数量(单)</td>
					<td>pc端退还金额(元)</td>
					<td>手机端未接手数量(单)</td>
					<td>手机端退还金额(元)</td>
					<td>完成数量(单)</td>
					<td>任务状态</td>
					<td>是否平台快递</td>
					<td>是否平台返款</td>
					<td>平台返款(元)</td>
					<td>加赏(元)</td>
					<td>限制购买周期(元)</td>
					<td>快速完成任务(元)</td>
					<td>优先审核(元)</td>
					<td>定时发布(元)</td>
					<td>发布任务金额(元)</td>
					<td>父任务增值费用花费(元)</td>
				</tr>
			</thead>
			<tbody id="taskBlanceContainer"></tbody>
		</table>
		<div id="taskNoMsg">
			<div class="warnBox">
				<span class="iconfont">&#xf00b6;</span> 没有任务!
			</div>
		</div>
		<div class="pagin-btm clearFix" style="display: none;">
			<div class="pagination"></div>
		</div>
		<div class="popWrapper" style="display: none;" id="tr_loading_mask">
			<div class="maskLayer"></div>
			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />
		</div>
	</div>
</div>

<textarea class="muban" id="taskTemp">
	{{#results}}
	<tr data-id="{{taskIdStr}}">
					<td>{{taskIdStr}}</td>
					#{if role=='admin'}
					<td>{{sellerNick}}</td>
					#{/if}
					<td>{{publishTimeStr}}</td>
					<td>{{platformStr}}</td>
					<td>{{shopName}}</td>
					<td>{{itemId}}</td>
					<td>{{itemPriceStr}}</td>
					<td>{{totalOrderNum}}</td>
					<td>{{totalTaken}}</td>
					<td>{{noPcTackCount}}</td>
					<td>{{pcRefundIngot}}</td>
					<td>{{noMobileTackCount}}</td>
					<td>{{mobileRefundIngot}}</td>
					<td>{{finishedCount}}</td>
					<td>{{statusStr}}</td>
					<td>{{isExpressStr}}</td>
					<td>{{isSysRefundStr}}</td>
					<td>{{sysRefundStr}}</td>
					<td>{{extraRewardIngot}}</td>
					<td class="red">{{buyTimeInterval}}</td>
					<td class="red">{{speedTaskIngot}}</td>
					<td class="red">{{speedExamineStr}}</td>
					<td class="red">{{publishTimerIntervalStr}}</td>
					<td style="font-weight:bold;">{{publishIngot}}</td>
					<td style="font-weight:bold;">{{totalDeposit}}</td>
	</tr>
	{{/results}}
</textarea>
<!--keyword muban-->
<textarea class="muban" id="rowTemp">
	{{#results}}
	<tr data-id="{{taskIdStr}}">
					<td>{{taskIdStr}}</td>
					#{if role=='admin'}
					<td>{{sellerNick}}</td>
					#{/if}
					<td>{{device}}</td>
					<td>{{takenTime}}</td>
					<td>{{buyerAccountNick}}</td>
					<td>{{orderId}}</td>
					<td>{{statusStr}}</td>
					<td>{{itemPriceStr}}</td>
					<td>{{postage}}</td>
					<td>{{refundDeposit}}</td>
					<td>{{paidFeeStr}}</td>
					<td class="red">{{expressIngotStr}}</td>
				    <td class="red">{{costStatistics}}</td>
					<td class="red">{{baseOrderIngotStr}}</td>
					<td style="font-weight:bold;">{{totalDeposit}}</td>
	</tr>
	{{/results}}
</textarea>
#{set 'moreScripts'}
<script src="@{'/public/javascripts/date.js'}" type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.datePicker.js'}"
	type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.pagination.js'}"
	type="text/javascript"></script>
<script src="@{'/public/javascripts/mustache.min.js'}"
	type="text/javascript"></script>
<script src="@{'/public/javascripts/jquery.number.min.js'}"
	type="text/javascript"></script>
<script src="@{'/public/javascripts/task/seller-blance.js'}"
	type="text/javascript"></script>
<script type="text/javascript">
	App.module = 'sellerBlance';
</script>
#{/set}
